﻿@model HdipCricketClub.ViewModels.ScorecardResultTypeViewModel

@{
    ViewBag.Title = "Result Type";
}

<h2>ResultType</h2>

@using (@Html.BeginForm())
{
<fieldset>
    <legend>Fixture:</legend>
        @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Team.Club.ShortName) @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Team.name)
        Vs @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Opponent.club_name) @Html.DisplayFor(ModelItem => Model.ScorecardFixture.Opponent.team_name)<br />
        On @Html.DisplayFor(ModelItem => Model.ScorecardFixture.date)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.fixture_id)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.team_id)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.opponent_id)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.home)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.type)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.date)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.start_time)
        @Html.HiddenFor(ModelItem => Model.ScorecardFixture.no_of_players)
    <br />
</fieldset>
<fieldset>
    <legend>How was the match completed:</legend>
        @Html.HiddenFor(ModelItem => Model.ScorecardHeaderDetail.fixture_id)
        <br />
            Called Off @Html.RadioButtonFor(ModelItem => Model.ScorecardHeaderDetail.result_id, 1)
            Abandoned @Html.RadioButtonFor(ModelItem => Model.ScorecardHeaderDetail.result_id, 2)
            Completed @Html.RadioButtonFor(ModelItem => Model.ScorecardHeaderDetail.result_id, 3)
            <span class="result_type_error">@ViewBag.ErrorMessage</span>
        <br />
</fieldset>
<p>
    <input type="submit" value ="Enter" />
</p>    
}

